package cn.wizzer.framework.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadUtil {

    // 根据cpu核数创建线程池
    private static final ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()/2);

    private ThreadUtil() {}

    public static void execute(Runnable run){
        executorService.execute(run);
    }
}
